<?php

namespace Nim\Bundle\ModelBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * ClientOrderItem
 *
 * @ORM\Table(name="client_order_item")
 * @ORM\Entity
 */
class ClientOrderItem
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="quantity", type="integer")
     */
    private $quantity;

    /**
     * @ORM\ManyToOne(targetEntity="ClientOrder", inversedBy="clientOrderItems")
     * @ORM\JoinColumn(name="client_order_id")
     */
    private $clientOrder;
    
    /**
     * @ORM\OneToOne(targetEntity="Page")
     * @ORM\JoinColumn(name="page_id")
     */
    private $page;

    /**
     * @ORM\OneToOne(targetEntity="Product")
     * @ORM\JoinColumn(name="product_id")
     */
    private $product;
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set quantity
     *
     * @param integer $quantity
     * @return ClientOrderItem
     */
    public function setQuantity($quantity)
    {
        $this->quantity = $quantity;
    
        return $this;
    }

    /**
     * Get quantity
     *
     * @return integer 
     */
    public function getQuantity()
    {
        return $this->quantity;
    }

    /**
     * Set clientOrder
     *
     * @param \Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrder
     * @return ClientOrderItem
     */
    public function setClientOrder(\Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrder = null)
    {
        $this->clientOrder = $clientOrder;
    
        return $this;
    }

    /**
     * Get clientOrder
     *
     * @return \Nim\Bundle\ModelBundle\Entity\ClientOrder 
     */
    public function getClientOrder()
    {
        return $this->clientOrder;
    }

    /**
     * Set page
     *
     * @param \Nim\Bundle\ModelBundle\Entity\Page $page
     * @return ClientOrderItem
     */
    public function setPage(\Nim\Bundle\ModelBundle\Entity\Page $page = null)
    {
        $this->page = $page;
    
        return $this;
    }

    /**
     * Get page
     *
     * @return \Nim\Bundle\ModelBundle\Entity\Page 
     */
    public function getPage()
    {
        return $this->page;
    }

    /**
     * Set product
     *
     * @param \Nim\Bundle\ModelBundle\Entity\Product $product
     * @return ClientOrderItem
     */
    public function setProduct(\Nim\Bundle\ModelBundle\Entity\Product $product = null)
    {
        $this->product = $product;
    
        return $this;
    }

    /**
     * Get product
     *
     * @return \Nim\Bundle\ModelBundle\Entity\Product 
     */
    public function getProduct()
    {
        return $this->product;
    }
}